import Router from 'vue-router'
import Vue from 'vue'

Vue.use(Router)

const yuqing = ()=> import ('../views/yuqing/yuqing')
const jinji = ()=> import ('../views/jinji/jinji')
const searchresult = ()=> import('../views/searchresult')
const test = ()=>import('../views/test')
const home = ()=>import('../views/Home')
const login = ()=>import('../views/login/login')

const routes=[
    {
        path:'',
        redirect:'/home'
    },
    {
        path:'/home',

        component:home,
        children:[
            {
                path:'/yuqing/:type',
                component:yuqing
            },
            {
                path:'/jinji/:type',
                component:jinji
            },
            {
                path:'/search/:keyword',
                component:searchresult
            },
            {
                path:'/test',
                component:test
            }
        ]
    },
    {
        path:'/login',
        component:login,
    }

]


export default new Router({
    routes,
    mode:'hash'
})